﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:controls="clr-namespace:Quebec.Silverlight.Controls.WindowControls"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<ImageBrush x:Key="IconClose"
				ImageSource="/Quebec.Silverlight.Controls.WindowControls;component/Images/Close.jpg"
				Stretch="Uniform" />
	<ImageBrush x:Key="IconCloseHover"
				ImageSource="/Quebec.Silverlight.Controls.WindowControls;component/Images/CloseHover.jpg"
				Stretch="Uniform" />
	<ImageBrush x:Key="IconMaximize"
				ImageSource="/Quebec.Silverlight.Controls.WindowControls;component/Images/Maximize.jpg"
				Stretch="Uniform" />
	<ImageBrush x:Key="IconMaximizeHover"
				ImageSource="/Quebec.Silverlight.Controls.WindowControls;component/Images/MaximizeHover.jpg"
				Stretch="Uniform" />
	<ImageBrush x:Key="IconMinimize"
				ImageSource="/Quebec.Silverlight.Controls.WindowControls;component/Images/Minimize.jpg"
				Stretch="Uniform" />
	<ImageBrush x:Key="IconMinimizeHover"
				ImageSource="/Quebec.Silverlight.Controls.WindowControls;component/Images/MinimizeHover.jpg"
				Stretch="Uniform" />

	<Style TargetType="controls:CloseButton">
		<Setter Property="Cursor"
				Value="Hand" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:CloseButton">
					<Grid Width="10"
						  Height="10"
						  Background="Transparent">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseEnter">
									<Storyboard>
										<DoubleAnimation Duration="0"
														 To="1"
														 Storyboard.TargetProperty="(UIElement.Opacity)"
														 Storyboard.TargetName="Hover" />
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseLeave" />
								<VisualState x:Name="Normal" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid Background="{StaticResource IconClose}"
							  VerticalAlignment="Bottom"
							  Height="7"
							  Width="8" />
						<Grid Background="{StaticResource IconCloseHover}"
							  Width="8"
							  Height="7"
							  VerticalAlignment="Bottom"
							  x:Name="Hover"
							  Opacity="0" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="controls:MaximizeButton">
		<Setter Property="Cursor"
				Value="Hand" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:MaximizeButton">
					<Grid Width="10"
						  Height="10"
						  Background="Transparent">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseEnter">
									<Storyboard>
										<DoubleAnimation Duration="0"
														 To="1"
														 Storyboard.TargetProperty="(UIElement.Opacity)"
														 Storyboard.TargetName="Hover" />
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseLeave" />
								<VisualState x:Name="Normal" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid Background="{StaticResource IconMaximize}"
							  VerticalAlignment="Bottom"
							  Width="9"
							  Height="8" />
						<Grid Background="{StaticResource IconMaximizeHover}"
							  Width="9"
							  Height="8"
							  VerticalAlignment="Bottom"
							  x:Name="Hover"
							  Opacity="0" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="controls:MinimizeButton">
		<Setter Property="Cursor"
				Value="Hand" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:MinimizeButton">
					<Grid Width="10"
						  Height="10"
						  Background="Transparent">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseEnter">
									<Storyboard>
										<DoubleAnimation Duration="0"
														 To="1"
														 Storyboard.TargetProperty="(UIElement.Opacity)"
														 Storyboard.TargetName="Hover" />
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseLeave" />
								<VisualState x:Name="Normal" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle Fill="{StaticResource IconMinimize}"
								   VerticalAlignment="Bottom"
								   Width="7"
								   Height="2" />
						<Rectangle Fill="{StaticResource IconMinimizeHover}"
								   x:Name="Hover"
								   VerticalAlignment="Bottom"
								   Width="7"
								   Height="2"
								   Opacity="0" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="controls:ResizeButton">
		<Setter Property="Cursor"
				Value="SizeNWSE" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:ResizeButton">
					<Grid Width="13"
						  Height="13"
						  Background="Transparent">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Canvas x:Name="Layer_1"
								Width="12.9984"
								Height="12.9984"
								Canvas.Left="0"
								Canvas.Top="0">
							<Path Width="3.00483"
								  Height="2.97879"
								  Canvas.Left="8.99366"
								  Canvas.Top="1.02071"
								  Stretch="Fill"
								  Fill="#FF999999"
								  Data="F1 M 8.99366,2.00496L 9.99354,2.00496L 9.99875,1.02071L 10.9986,1.02071L 10.9986,1.99975L 11.9985,1.99975L 11.9985,2.99963L 10.9986,2.99963L 10.9986,3.9995L 9.99875,3.9995L 9.99875,2.99963L 8.99887,2.99963L 8.99366,2.00496 Z " />
							<Path Width="3.00483"
								  Height="2.97879"
								  Canvas.Left="5.00706"
								  Canvas.Top="5.01512"
								  Stretch="Fill"
								  Fill="#FF999999"
								  Data="F1 M 5.00706,5.99938L 6.00694,5.99938L 6.01214,5.01512L 7.01202,5.01512L 7.01202,5.99417L 8.01189,5.99417L 8.01189,6.99404L 7.01202,6.99404L 7.01202,7.99392L 6.01214,7.99392L 6.01214,6.99404L 5.01227,6.99404L 5.00706,5.99938 Z " />
							<Path Width="3.00483"
								  Height="2.97879"
								  Canvas.Left="8.99106"
								  Canvas.Top="5.015"
								  Stretch="Fill"
								  Fill="#FF999999"
								  Data="F1 M 8.99106,5.99925L 9.99094,5.99925L 9.99614,5.015L 10.996,5.015L 10.996,5.99404L 11.9959,5.99404L 11.9959,6.99392L 10.996,6.99392L 10.996,7.99379L 9.99614,7.99379L 9.99614,6.99392L 8.99627,6.99392L 8.99106,5.99925 Z " />
							<Path Width="3.00483"
								  Height="2.97879"
								  Canvas.Left="8.99106"
								  Canvas.Top="9.03012"
								  Stretch="Fill"
								  Fill="#FF999999"
								  Data="F1 M 8.99106,10.0144L 9.99094,10.0144L 9.99615,9.03012L 10.996,9.03012L 10.996,10.0092L 11.9959,10.0092L 11.9959,11.009L 10.996,11.009L 10.996,12.0089L 9.99615,12.0089L 9.99615,11.009L 8.99627,11.009L 8.99106,10.0144 Z " />
							<Path Width="3.00483"
								  Height="2.97879"
								  Canvas.Left="5.00719"
								  Canvas.Top="9.0145"
								  Stretch="Fill"
								  Fill="#FF999999"
								  Data="F1 M 5.00719,9.99875L 6.00706,9.99875L 6.01227,9.0145L 7.01214,9.0145L 7.01214,9.99354L 8.01202,9.99354L 8.01202,10.9934L 7.01214,10.9934L 7.01214,11.9933L 6.01227,11.9933L 6.01227,10.9934L 5.01239,10.9934L 5.00719,9.99875 Z " />
							<Path Width="3.00483"
								  Height="2.97879"
								  Canvas.Left="1.00769"
								  Canvas.Top="9.0145"
								  Stretch="Fill"
								  Fill="#FF999999"
								  Data="F1 M 1.00769,9.99875L 2.00756,9.99875L 2.01277,9.0145L 3.01265,9.0145L 3.01265,9.99354L 4.01252,9.99354L 4.01252,10.9934L 3.01265,10.9934L 3.01265,11.9933L 2.01277,11.9933L 2.01277,10.9934L 1.0129,10.9934L 1.00769,9.99875 Z " />
						</Canvas>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:WindowFrame">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:WindowFrame">
					<Grid Background="Transparent">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>

						<StackPanel VerticalAlignment="Top"
									HorizontalAlignment="Right"
									Background="White"
									Height="10"
									Margin="0,10,10,0"
									Orientation="Horizontal">
							<controls:MinimizeButton VerticalAlignment="Bottom"
													 Margin="0,0,5,0" />
							<controls:MaximizeButton VerticalAlignment="Bottom"
													 Margin="0,0,5,0" />
							<controls:CloseButton VerticalAlignment="Bottom"
												  Margin="0,0,0,0" />
						</StackPanel>

						<controls:ResizeButton VerticalAlignment="Bottom"
											   HorizontalAlignment="Right"
											   Background="Transparent"
											   Margin="0,0,1,1" />

						<Border BorderBrush="#999999"
								Opacity="0.5"
								BorderThickness="1" />

					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>
